<?php

/**
 * Compras form.
 *
 * @package    tercermilenio
 * @subpackage form
 * @author     Your name here
 */
class AgregarProductosForm extends BaseDetalleComprasForm {

    public function configure() {

    }

    public function setup() {
        parent::setup();
        $this->setWidgets(array(
            //'det_cpr_articulo' => new sfWidgetFormInput(),
            'det_cpr_talle' => new sfWidgetFormInput(),
            //'det_cpr_compra' => new sfWidgetFormInputHidden(),
            'det_cpr_cantidad' => new sfWidgetFormInput(array('label' => 'Cantidad')),
            //'det_cpr_precio' => new sfWidgetFormInput(),
        ));

        $this->setValidators(array(
            //'det_cpr_articulo' => new sfValidatorPropelChoice(array('model' => 'Productos', 'column' => 'pro_articulo', 'required' => false)),
            //'det_cpr_talle' => new sfValidatorPropelChoice(array('model' => 'Productos', 'column' => 'pro_talle', 'required' => false)),
            //'det_cpr_compra' => new sfValidatorPropelChoice(array('model' => 'Compras', 'column' => 'cpr_id', 'required' => false)),
            'det_cpr_cantidad' => new sfValidatorInteger(array('required'=>false)),
            //'det_cpr_precio' => new sfValidatorNumber(),
        ));

        $this->widgetSchema->setNameFormat('detalle_compras[%s]');

        $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
    }

}
